<template>
  <div>
    <component v-for="item in info_attr" :key='item.attrId' 
                :is="'com-'+item.type"
                :item_data="item"
    ></component>
  </div>
</template>

<script>
import comInput from './com-input'
import comTextarea from './com-textarea'
import comSelector from './com-selector'
import comDatetime from './com-datetime'
import comUpload from './com-upload'
import comShow from './com-show'
export default {
  components: {
    comInput,
    comTextarea,
    comSelector,
    comDatetime,
    comUpload,
    comShow,
  },
  props:{
    info_attr: Array,
    // info_attr:[ {attrId: 1, attrName:'物品名称', type:'input', valueSelect:'', attrValue:''} ] // 接收数据的格式
  },
  mounted() {
    
  },
  data() {
    return {
      
    }
  },
  methods: {
    
  },
}
</script>

<style>
.com_div{
  display: flex;
  height: 50px;
}
.com_left{
  width: 100px;
  text-align: center;
  /* background: rgb(163, 95, 95); */
}
.com_left .span{
  font-size: 16px;
  margin-top: 15px;
}
.com_right{
  width: 500px;
  /* background: rgb(255, 142, 142); */
}
.com_right .el-input{
  margin-top: 5px;
  width: 300px;
}

.com_right .el-textarea{
  width: 400px;
}
/*
input{
    width: 300px;
    height: 36px;
    border-radius: 5px;
    border-width: 0;
}
.el-select{
    width: 100px;
}
.step_02 .el-input{
    width: 300px;
}
.el-textarea{
    width: 300px;
}
*/
</style>